package com.autism.app;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.widget.Button;
import android.widget.ImageView;

import com.bumptech.glide.Glide;

public class  DidaActivity extends AppCompatActivity {
    private ImageView imgCover;
    private Button button;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_dida);

        imgCover = findViewById(R.id.imageView13);
        String url = "https://cn.yadingtour.com/images/2019_12/20191108000006.jpg";
        Glide.with(this).load(url).into(imgCover);
        imgCover = findViewById(R.id.imageView17);
        String url0 = "https://cn.yadingtour.com/images/2019_12/20191108000001.jpg";
        Glide.with(this).load(url0).into(imgCover);

        button = findViewById(R.id.button2);
        button.setOnClickListener(v -> {
            Uri uri = Uri.parse("http://www.mafengwo.cn/travel-news/1339175.html");
            Intent intent = new Intent(Intent.ACTION_VIEW, uri);
            startActivity(intent);
        });
        button = findViewById(R.id.button4);
        button.setOnClickListener(v -> {
            Uri uri = Uri.parse("http://old.scal.com.cn/news/detail/4348");
            Intent intent = new Intent(Intent.ACTION_VIEW, uri);
            startActivity(intent);
        });
    }
}